package com.bosssoft.mapper;

import com.bosssoft.bean.UserBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author guozhi
 * @version 1.0.0
 * @date 2022-06-05 14:50
 * @interface UserMapper
 * @description
 */
public interface UserMapper {
    /**
     * 新增用戶
     * @param user
     * @return
     * @throws Exception
     */
    int insertUser(UserBean user) throws Exception;
    /**
     * 修改用戶
     * @param user
     * @param id
     * @return
     * @throws Exception
     */
    int updateUser (UserBean user) throws Exception;
    /**
     * 刪除用戶
     * @param id
     * @return
     * @throws Exception
     */
    int deleteUser(int id) throws Exception;
    /**
     * 根据id查询用户信息
     * @param id
     * @return
     * @throws Exception
     */
    UserBean selectUserById(int id) throws Exception;
    /**
     * 查询所有的用户信息
     * @return
     * @throws Exception
     */
    List<UserBean> selectAllUser() throws Exception;

    List<UserBean> selectAllUserWithRoles() throws Exception;
}
